package ymjy;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.IdUtil;
import sun.misc.BASE64Decoder;

import java.io.*;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.List;

/**
 * @author DengZhiYuan
 * @version 1.0
 * @date 2022/3/3 15:06
 */
public class BugTest {

    public static void main(String[] args) throws Exception {
//        String encode = URLEncoder.encode("健康管理PETMR基础E+", "utf-8");
//        String decode =URLDecoder.decode (encode, "utf-8");
//        System.out.println(decode);

        new BugTest().printStr();
    }


    public void savePDF() throws Exception {
        String f = "C:\\Users\\dzy\\Desktop\\禅道1669：6分钟步行试验产品数据对接\\a.txt";
        String filePath = "C:\\Users\\dzy\\Desktop\\禅道1669：6分钟步行试验产品数据对接\\20230314.PDF";
        List<String> strings = FileUtil.readLines(f, "UTF-8");
        String str = strings.get(0);


        byte[] decode = Base64.getDecoder().decode(str.getBytes(StandardCharsets.UTF_8));
        FileOutputStream fos = new FileOutputStream(filePath);
        fos.write(decode);

        fos.flush();
        fos.close();
    }

    public void printStr(){
        System.out.println(System.currentTimeMillis());
    }

}
